<?php
namespace app\mail\controller;

use tp5_lib\common\controller\TestBaseController;
use tp5_lib\mail\logic\Examine;

class TestController extends TestBaseController
{
    public function index()
    {
        $errors=[];
        $result=Examine::checkExtension();
        if($result !== true){
            $errors[]=$result;
        }
        
        $result=Examine::checkCAFile();
        if($result !== true){
            $errors[]=$result;
        }

        if($errors){
            $this->result($errors,0,"未通过检查");
        }
        
        $this->success("检查通过");
    }
}
